<template>
	<view>
	<rich-text :nodes="res"></rich-text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: '',
				res: ''
			};
		},
		onLoad(o) {
			console.log(o);
			if (o.type == 1) {
				this.type = 'user_agreement'
			} else {
				this.type = 'privacy_agreement'
			}
			this.info()
		},
		methods: {
			info() {
				this.$api.rule({
					name: this.type
				}).then(res => {
					this.res = res.data
				})

			}
		}
	}
</script>

<style lang="scss">

</style>